
clear
use "newsurveyslong.dta", clear
keep rid survey COLLEGEMORE
duplicates drop
collapse (mean) COLLEGEMORE, by(survey)
merge 1:m survey using "newsurveys/SNR_updated2018.dta"
keep if _merge==3
keep survey unit COLLEGEMORE
duplicates drop
saveold temp.dta, replace

clear
use "SNR.dta", clear
keep rid survey education
duplicates drop
recode education (1/5=0) (6/7=1) (else=.), gen(COLLEGEMORE)
collapse (mean) COLLEGEMORE, by(survey)
merge 1:m survey using "SNR_tresults.dta"
keep survey unit COLLEGEMORE
duplicates drop
append using temp.dta
saveold educationkfold.dta, replace